﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ContactManager._Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:foaf="http://xmlns.com/foaf/0.1/">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>    
        <asp:ListView ID="contactsListView" runat="server">    
        <LayoutTemplate>
            <div>
            <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
            </div>
                        
        </LayoutTemplate>        
        <ItemTemplate>
            <figure typeof="foaf:Person">
                <details>
                <summary property="foaf:name"><%#Eval("Name") %></summary>
                <asp:ListView ID="phoneListView" ItemPlaceholderID="itemPlaceholderPhone" DataSource='<%#Eval("PhoneNumbers") %>' runat="server">
                    <LayoutTemplate>
                        <ul>
                        <asp:PlaceHolder ID="itemPlaceholderPhone" runat="server" />
                        </ul>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <li>
                        <label><%#Eval("PhoneType") %></label>
                        <a property="foaf:Phone" href='tel:<%#Eval("PhoneNumber") %>'><%#Eval("PhoneNumber") %></a>
                        </li>
                                                                       
                                                
                    </ItemTemplate>
                </asp:ListView>
                </details>
                
            </figure>            
            </ItemTemplate>
        </asp:ListView>              
    </div>
    </form>
</body>
</html>
